package com.hsgene.consumables.service.api;

import com.hsgene.common.util.result.ApiResult;
import com.hsgene.consumables.service.api.impl.LogisticsServiceImpl;
import com.hsgene.logistics.domain.LogisticsInfo;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

/**
 * 快递100查看物流
 */
@FeignClient(name = "ms-mod-logistics", path = "/v1.0/genetic/testing/express", fallback = LogisticsServiceImpl.class)
public interface LogisticsService {

    /**
     * 查询物流
     *
     * @param orderId 订单id
     * @return
     */
    @GetMapping
    ApiResult<List<LogisticsInfo>> queryLogistics(@RequestParam("orderId") String orderId);

    /**
     * 新增物流信息
     *
     * @param info 物流信息
     */
    @PostMapping
    ApiResult<Integer> addLogistics(LogisticsInfo info);

}
